package fr.oz.mobile.module.profile 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import fr.oz.core.datas.ProfilListDatas;
	/**
	 * ...
	 * @author Fazermokeur
	 */
	public class ProfilNavItem extends Sprite
	{
		
		private var _profil:ProfilListDatas;
		
		public function ProfilNavItem(profil:ProfilListDatas) 
		{
			addEventListener(Event.ADDED_TO_STAGE, init);
			
			_profil = profil;
			
		}
		
		public function init(e:Event):void
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			addEventListener(Event.REMOVED_FROM_STAGE, dispose);
			
			
			this.graphics.beginFill(0xffffff * Math.random(), .2);
			this.graphics.drawRect(0, 0, stage.stageWidth, 90);
			this.graphics.endFill();
		}
		
		private function dispose(e:Event):void 
		{
			removeEventListener(Event.REMOVED_FROM_STAGE, dispose);
		}
		
		public function get profil():ProfilListDatas { return _profil; }
		
	}

}